﻿<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jQuery支持拖动图片上传预览代码</title>
</head>

<script src="js/jquery.js"></script>
<script src="js/upload.js"></script>

<body><script src="/demos/googlegg.js"></script>

<h3>可将图片拖拽到下框中</h3>
<div id="drop_area"></div>

<script type="text/javascript">
var dragImgUpload = new DragImgUpload("#drop_area",{
	callback:function (files) {
		//回调函数，可以传递给后台等等
		var file = files[0];
		console.log(file.name);
	}
})
</script>

<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
<p>适用浏览器：360、FireFox、Chrome、Opera、傲游、搜狗、世界之窗. 不支持Safari、IE8及以下浏览器。</p>
<p>来源：<a href="http://www.lanrenzhijia.com/" target="_blank">懒人</a></p>
</div>
</body>
</html>
